<?php
	session_start();
	header("Content-type: text/html; charset=utf-8");
	require_once './source/core/run.php';
	require_once 'data/include/Functions.php';
	require_once 'data/include/Cart.class.php';
	
	
	$cart = new Cart();
	$order_no = $cart->getOrderId();
	p($order_no);
//	$userid = $_POST['userid'];
	$address = $_POST['sfdq'].$_POST['csdq'].$_POST['qydq'].$_POST['detail_y'];
	$mobile = $_POST['utel'];
	$addtime = time();
	$total_price = $_POST['totalPrice'];
//	$send_time = $_POST['send_time'];
	$total_price = $_SESSION['total'];
	$sql	= "INSERT INTO ".DB_PREFIX."order(order_no,address,mobile,addtime,total_price)VALUES('{$order_no}','{$address}','{$mobile}','{$addtime}','{$total_price}')";
	$product= $db->query($sql);
	if($product){
		Core_Fun::halt("在线预定成功，我们将会尽快给您联系，感谢您的支持！","order-list.php",0);
	}
	?>